package com.github.littleantfly.dictionary.init;

import com.github.littleantfly.dictionary.cache.loader.DictCacheLoader;
import org.springframework.beans.factory.InitializingBean;

public class DictCacheLoad implements InitializingBean {

    private final DictCacheLoader dictCacheLoader;

    public DictCacheLoad(DictCacheLoader dictCacheLoader) {
        this.dictCacheLoader = dictCacheLoader;
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        dictCacheLoader.loadCache();
    }
}
